﻿<%@ Page Title="Tarifas" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Tarifas.aspx.cs" Inherits="HotelBrisayArena.Tarifas" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 329px;
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
  <h2><asp:Label ID="Label1" runat="server" Text="Tarifas"></asp:Label></h2> 
    <br />
    <% int i = 2;
       Business.ImagenBusiness imagenBusiness = new Business.ImagenBusiness(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
       Business.TipoHabitacionBusiness tipoHabBusiness = new Business.TipoHabitacionBusiness(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
       Business.CaracteristicaBusiness caracteristicaBusiness = new Business.CaracteristicaBusiness(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
       LinkedList<Domain.TipoHabitacion> tipoHabitaciones = new LinkedList<Domain.TipoHabitacion>();
      // LinkedList<Library.Common.Domain.Caracteristica> caracteristicas = new LinkedList<Library.Common.Domain.Caracteristica>();

       tipoHabitaciones = tipoHabBusiness.ObtenerTiposDeHabitacion();

       //LinkedList<Library.Common.Domain.Caracteristica> caracteristicas2 = new LinkedList<Library.Common.Domain.Caracteristica>();
       String caracteristicas = null;
            
           foreach (Domain.TipoHabitacion tipoHabitacionActual in tipoHabitaciones)
           {
               caracteristicas = caracteristicaBusiness.GetCaracteristicas(tipoHabitacionActual.IdTipoHab);
               Domain.Imagen imagen = new Domain.Imagen();
               imagen = imagenBusiness.GetImagen(tipoHabitacionActual.IdImagen);
               byte[] imageBytes = imagen.Image;
               String base64ImageString = ConvertBytesToBase64(imageBytes);
               Imagen1.Src = "data:image/jpg;base64," + base64ImageString;
               Label3.Text = tipoHabitacionActual.Tipo;


               //Label2.Text = "Algunas de las facilidades con las que cuenta la habitacion :" + caracteristicas.ToString();%>
               
               <%
                   Label4.Text = "Precio Habitacion : $"+tipoHabitacionActual.Tarifa.ToString();
                   Label5.Text = tipoHabitacionActual.Descripcion;
               //Imagen1.ID = "imagen" + i;       
               i++;%>
    <table cellpadding="2" cellspacing="2" >
        <tr>
            <td>
                <img id="Imagen1" runat="server" src="" alt="" height="110" width="190" onclick="" />
            </td>
            <td class="style1">
                <h1>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>&nbsp;&nbsp;&nbsp;</h1>
                
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label5" runat="server" Text="Label" Font-Names="Arial" 
                    Font-Size="Small" ForeColor="Black"></asp:Label>
                 
                  <br />
                <br />
                 
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:Label ID="Label4" runat="server" Text="Label" Font-Names="Arial" 
                    Font-Size="Small" ForeColor="Black"></asp:Label>
               
                <br />
                <br />
                 &nbsp;&nbsp;&nbsp;&nbsp;
                 <br />
                
            </td>
        </tr>
    </table>
    <% }
       %>
</asp:Content>

               